package org.tobaccomain;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.tobaccomain.configuration.UdpReceiver;


@SpringBootApplication
public class TobaccoMainApplication implements CommandLineRunner {

    @Autowired
    private UdpReceiver udpReceiver;

    public static void main(String[] args) {
        SpringApplication.run(TobaccoMainApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        udpReceiver.start();
    }
}
